package cloud.kiko.psn.feign.rmi;

import cloud.kiko.psn.pojo.common.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 银行卡微服务声明式调用API<br>
 * 2024/7/14 0:43
 */
@FeignClient(value = "biz-micro-service-card")
@RequestMapping("card")
public interface CardRMI{
	/**
	 * 支付服务
	 * @param userId 用户id
	 * @param opAmount 金额
	 */
	@PutMapping("pay/{userId}/{opAmount}")
	R<?> pay(@PathVariable("userId") Long userId, @PathVariable("opAmount") Double opAmount);
	
	/**
	 * 充值服务
	 * @param userId 用户id
	 * @param opAmount 金额
	 */
	@PutMapping("deposit/{userId}/{opAmount}")
	R<?> deposit(@PathVariable("userId") Long userId, @PathVariable("opAmount") Double opAmount);
}
